package cn.donting.jme.expansion.attribute;


import cn.donting.jme.swing.JTitlePane;
import org.jdesktop.swingx.VerticalLayout;

import javax.swing.*;
import java.awt.*;
import java.util.Collection;

public class PaneAttributeGroup extends AttributeGroup {


    private JPanel content=new JPanel();
    public PaneAttributeGroup() {
        content.setLayout(new VerticalLayout());
    }


    public void addAttribute(Attribute attribute){
        super.addAttribute(attribute);
        content.add(attribute.getUIContainer());
    }

    @Override
    public void clear() {
        super.clear();
        content.removeAll();
    }

    @Override
    public Container getUiContainer() {
        return content;
    }

}
